import request from '@/utils/request'
import { data } from 'autoprefixer'
export const findPopualtion = (search) => 
    request({
        url: '/population',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            name: search.name
        }
    })

export const removePopualtion = (id) =>
    request({
        url:'/population/' + id  ,
        method: 'delete'
    })

export const getPopualtion = (id) =>
    request({
        url:'/population/' + id,
        method: 'get'

    })   
    //根據編號查詢對象
    export const getPopualtionById = (id) =>
    request({
        url:'/population/getPopualtionById/' + id,
        method: 'get'

    })   
    export const updatePopualtion = (population) =>
    request({
        url:'/population/upPopulation',
        method: 'put',
        data:population
    })   
    
export const savePopDis = (population) =>
    request({
        url:'/population' ,
        method: 'get',
        data:population
    })